home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Re ODF Popups.4 < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.9 KB  |  [TEXT/ttxt]

  1. Subject:     RE: ODF Popups
  2. Sent:        6/24/96 10:56 AM
  3. Received:    6/24/96 11:11 AM
  4. From:        Laurent Delamare, laurentd@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >Laurent,
  9. >Thanks for your clues. But unfortunately it's not the solution. I did have a
  10. >MENU resource available! When I compared the ODF-sample Forms with my 
  11. >resource I noticed that the only difference was the font. I want to display 
  12. > the popup in GENEVA 9. The sample uses the system font.
  13.  
  14. Leo
  15.  
  16. OK, I found the bug. When a popup resource both uses a custom font and a 
  17. menu
  18. variation of 4 the procId is increased by 12 and the macro IS_POPUP_PROCID
  19. returns false instead of true in FWContrH.cpp.
  20.  
  21. The only work-around is to patch FWContrH.cpp as follows and rebuild your 
  22. Framework library:
  23.  
  24. #define IS_POPUP_PROCID(id)  (id >= popupMenuProc && id <= popupMenuProc 
  25. + 15)
  26.  
  27. > In FWContrH.cpp the procId is
  28. >raised with kControlUsesOwningWindowsFontVariant. I was unable to find this
  29. >constant, but I figure that it's popupUseWFont as described in Inside
  30. >Macintosh. 
  31.  
  32. Yes, kControlUsesOwningWindowsFontVariant = popupUseWFont = 8 and is 
  33. defined 
  34. in the Apple header controls.h
  35.  
  36. > This means that the font of the owning window is used. Where is it
  37. >defined in ODF? In my resource there is only a position of the superview.
  38. >
  39.  
  40. No, this means that the font used by the popup is the one of the grafport
  41. at the time the popup is created.  ODF sets the font for that effect in
  42. PrivMacControlHelper::Initialize().   You don't need to worry about 
  43. getting
  44. the window's font.
  45.  
  46. Hope this helps,
  47.  
  48.  
  49. ______________________________________________________________________
  50. Laurent Delamare               laurentd@apple.com
  51. ODF Team                       http://www.devtools.apple.com/odf/
  52. Apple Computer, Inc.           http://www.opendoc.apple.com/
  53.